<?php

class IndexController extends Controller
{
	public function show()
	{
		//支持wap方式浏览
		if(false!==strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml'))
		{
			$this->redirect('wap');
		}

		$pager	=	PagerHelper::split(Book::count(null), 10);
		$list	=	Book::getList(null, $pager['r_offset'], $pager['p_size']);
		
		$this->assign('list', $list);
		$this->display();
	}
	
}

?>